package com.example.houseman.enums;

/**
 * 收款计划
 *
 * @author wsh
 * 账单类型（金融属性）,
 * "1：分期变更
 * 2：租约保理变更
 * 3：退租变更
 * 4：普通账单(正常房租租务计划)"
 */
public enum CollectionPlanZdType {

    FQBG("分期变更", 1),
    ZYBLBG("租约保理变更", 2),
    TZBG("退租变更", 3),
    PTZD("普通账单", 4);

    private String name;
    private int index;

    private CollectionPlanZdType(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (CollectionPlanZdType c : CollectionPlanZdType.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

}
